package sharedClasses;

import java.io.Serializable;
import java.util.ArrayList;

import sharedClasses.Play;


public class Match implements Serializable
{
	private int matchID;
	int[] result;
	public ArrayList<Play> children;
	public String Opponent; //add other match info, like date, time, location, etc.
	public String Date;
	public String Location;
	
	public Match(int id)
	{
		matchID = id; 
	}
	
	public Match()
	{
		matchID = 0;
		children = new ArrayList<Play>();

	}
	
	public void addPlay(Play p){
		children.add(p);
	}
	
	public int getMatchID()
	{
		return matchID;
	}
	
	public void setMatchID(int id)
	{
		matchID = id;
	}
	
	public Play[] getChildArray()
	{
		Play[] plays = new Play[children.size()];
		for (int i = 0; i < children.size(); i++)
		{
			plays[i] = children.get(i);
		}
		return plays;
	}
}
